<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jstl/core">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	<meta name="description" content=""/>
	<meta name="author" content=""/>

	<title>Cadastrar Venda</title>

	<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css" />
	<link rel="stylesheet" type="text/css" href="../css/bootstrap-theme.min.css" />
	<link rel="stylesheet" type="text/css" href="../css/jquery-ui-1.10.4.custom.min.css" />
	<link rel="stylesheet" type="text/css" href="../css/imotech.css" />
	
	<script type="text/javascript" src="../js/jquery-2.0.2.min.js"></script>
	<script type="text/javascript" src="../js/bootstrap.min.js"></script>
	<script type="text/javascript" src="../js/jquery-ui-1.10.4.custom.min.js"></script>

</head>

<body>


	<f:view>
	<div class="container">

			<!-- Main jumbotron for a primary marketing message or call to action -->
			<div class="jumbotron">
				<h1>Imotech</h1>
				<p>Controle sua imobiliária.</p>
			</div>


			<div class="page-header">
				<h4>Busca de imóvel</h4>
			</div>

			<h:form role="form" styleClass="form-horizontal">
			
			<div class="row">
				<div class="col-md-3">
					<label class="col-sm-6 control-label">Negociação:</label>
					<div class="col-sm-6">
						<h:selectOneMenu value="#{busca.negociacao}" styleClass="form-control">
							<f:selectItem itemValue="" itemLabel="Todos" />
   							<f:selectItem itemValue="alugar" itemLabel="Alugar" />
   							<f:selectItem itemValue="temporada" itemLabel="Alugar por Temporada" />
   							<f:selectItem itemValue="compraVenda" itemLabel="Compra/Venda" />
						</h:selectOneMenu>
					</div>
				</div>
				<div class="col-md-3">
					<label class="col-sm-6 control-label">Tipo:</label>
					<div class="col-sm-6">
						<h:selectOneMenu value="#{busca.tipo}" styleClass="form-control">
							<f:selectItem itemValue="" itemLabel="Todos" />
   							<f:selectItem itemValue="casa" itemLabel="Casa" />
   							<f:selectItem itemValue="apartamento" itemLabel="Apartamento" />
   							<f:selectItem itemValue="terreno" itemLabel="Terreno" />
   							<f:selectItem itemValue="kitnet" itemLabel="Kitnet" />
						</h:selectOneMenu>
					</div>
				</div>
				<div class="col-md-4">
					<label class="col-sm-4 control-label">Bairro:</label>
					<div class="col-sm-8">
						<h:selectOneMenu value="#{busca.bairro}" styleClass="form-control">
							<f:selectItem itemValue="" itemLabel="Todos" />
							<f:selectItem itemValue="Alecrim" itemLabel="Alecrim" />
							<f:selectItem itemValue="Areia Preta" itemLabel="Areia Preta" />
							<f:selectItem itemValue="Bairro Nordeste" itemLabel="Bairro Nordeste" />
							<f:selectItem itemValue="Barro Vermelho" itemLabel="Barro Vermelho" />
							<f:selectItem itemValue="Bom Pastor" itemLabel="Bom Pastor" />
							<f:selectItem itemValue="Candelaria" itemLabel="Candelaria" />
							<f:selectItem itemValue="Capim Macio" itemLabel="Capim Macio" />
							<f:selectItem itemValue="Cidade Alta" itemLabel="Cidade Alta" />
							<f:selectItem itemValue="Cidade da Esperanca" itemLabel="Cidade da Esperanca" />
							<f:selectItem itemValue="Cidade Nova" itemLabel="Cidade Nova" />
							<f:selectItem itemValue="Cidade Satelite" itemLabel="Cidade Satelite" />
							<f:selectItem itemValue="Cidade Verde" itemLabel="Cidade Verde" />
							<f:selectItem itemValue="Dix-sept Rosado" itemLabel="Dix-sept Rosado" />
							<f:selectItem itemValue="Felipe Camarao" itemLabel="Felipe Camarao" />
							<f:selectItem itemValue="Guarapes" itemLabel="Guarapes" />
							<f:selectItem itemValue="Igapo" itemLabel="Igapo" />
							<f:selectItem itemValue="Lagoa Azul" itemLabel="Lagoa Azul" />
							<f:selectItem itemValue="Lagoa Nova" itemLabel="Lagoa Nova" />
							<f:selectItem itemValue="Lagoa Seca" itemLabel="Lagoa Seca" />
							<f:selectItem itemValue="Mae Luiza" itemLabel="Mae Luiza" />
							<f:selectItem itemValue="Mirassol" itemLabel="Mirassol" />
							<f:selectItem itemValue="Morro Branco" itemLabel="Morro Branco" />
							<f:selectItem itemValue="Nossa Senhora da Apresentacao" itemLabel="Nossa Senhora da Apresentacao" />
							<f:selectItem itemValue="Nazare" itemLabel="Nazare" />
							<f:selectItem itemValue="Nova Cidade" itemLabel="Nova Cidade" />
							<f:selectItem itemValue="Nova Descoberta" itemLabel="Nova Descoberta" />
							<f:selectItem itemValue="Nova Natal" itemLabel="Nova Natal" />
							<f:selectItem itemValue="Nova Parnamirim" itemLabel="Nova Parnamirim" />
							<f:selectItem itemValue="Pajucara" itemLabel="Pajucara" />
							<f:selectItem itemValue="Parque das Colinas" itemLabel="Parque das Colinas" />
							<f:selectItem itemValue="Petropolis" itemLabel="Petropolis" />
							<f:selectItem itemValue="Pirangi" itemLabel="Pirangi" />
							<f:selectItem itemValue="Pitimbu" itemLabel="Pitimbu" />
							<f:selectItem itemValue="Planalto" itemLabel="Planalto" />
							<f:selectItem itemValue="Ponta Negra" itemLabel="Ponta Negra" />
							<f:selectItem itemValue="Potengi" itemLabel="Potengi" />
							<f:selectItem itemValue="Potilandia" itemLabel="Potilandia" />
							<f:selectItem itemValue="Parque das Dunas" itemLabel="Parque das Dunas" />
							<f:selectItem itemValue="Praia do Meio" itemLabel="Praia do Meio" />
							<f:selectItem itemValue="Quintas" itemLabel="Quintas" />
							<f:selectItem itemValue="Redinha" itemLabel="Redinha" />
							<f:selectItem itemValue="Ribeira" itemLabel="Ribeira" />
							<f:selectItem itemValue="Rocas" itemLabel="Rocas" />
							<f:selectItem itemValue="San Vale" itemLabel="San Vale" />
							<f:selectItem itemValue="Santarem" itemLabel="Santarem" />
							<f:selectItem itemValue="Santos Reis" itemLabel="Santos Reis" />
							<f:selectItem itemValue="Serrambi" itemLabel="Serrambi" />
   							<f:selectItem itemValue="Tirol" itemLabel="Tirol" />
   							
   						</h:selectOneMenu>
					</div>
				</div>
				<div class="col-md-2">
					<div class="col-sm-offset-2 col-sm-10">
						<h:commandButton value="Buscar" styleClass="btn btn-default"></h:commandButton>
					</div>
				</div>
			</div>
			
			<div class="page-header">
				<h4>Escolha um imóvel</h4>
			</div>
			
				<table class="table table-stripped">
					<thead>
						<tr>
							<th>Imóvel</th>
							<th>Descrição</th>
							<th>Preço</th>
							<th></th>
						</tr>
					</thead>

					<tbody>
						<ui:repeat value="#{busca.imoveis}" var="cadaImovel">
							<tr>
								<td><h:commandLink
										action="#{vendaMB.selecionaImovel(cadaImovel.id)}"
										value="#{cadaImovel.titulo}">
									</h:commandLink></td>
								<td><h:outputText value="#{cadaImovel.descricao}" /></td>
								<td><h:outputText value="#{cadaImovel.valor}" /></td>
								<td></td>
							</tr>
						</ui:repeat>
					</tbody>
				</table>
			</h:form>
		</div>
		<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
		<script
			src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
	</f:view>
</body>
</html>
